Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #8592 to 6.x: Get cluster UUID from Info API call #8610

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

ycombinator
Copy link
Contributor

Cherry-pick of PR #8592 to 6.x branch. Original message:

Starting from 6.5.0, Elasticsearch will return the cluster_uuid as part of the GET _cluster/stats API response. However, the Elasticsearch metricbeat module has been in existence since 6.3.0 so it must fetch the cluster UUID from the GET / Elasticsearch API.

This PR makes it so the GET / API is always called and the cluster UUID from it is used. This is obviously not ideal in terms of API calls, but it's the simplest fix (for now, until we can figure out a nicer way to deal with version differences).

@ruflin
Copy link
Contributor

ruflin commented Oct 15, 2018

This will need make fmt with Go 1.10.3 instead of 1.11 (my assumption on why it doesn't pass the ingest phase).

@ycombinator Can also do it for you and push to your branch.

@ycombinator
Copy link
Contributor Author

@ruflin I double-checked that I'm running Go 1.10.3 and re-ran make fmt, just in case. Nothing changed. So I've rebased on the latest 6.x to see if that helps.

@ycombinator
Copy link
Contributor Author

Rebase didn't help. FWIW, here is another 6.x CI job that failed with the same error: https://beats-ci.elastic.co/job/elastic+beats+6.x/95/. So I think the fix, whatever it is, probably needs to happen in the 6.x branch itself?

@jsoriano
Copy link
Member

Issues here should be fixed by #8622, can you update with 6.x?

Starting from 6.5.0, Elasticsearch [will return](elastic/elasticsearch#32206) the `cluster_uuid` as part of the `GET _cluster/stats` API response. However, the Elasticsearch metricbeat module has been in existence since 6.3.0 so it must fetch the cluster UUID from the `GET /` Elasticsearch API.

This PR makes it so the `GET /` API is always called and the cluster UUID from it is used. This is obviously not ideal in terms of API calls, but it's the simplest fix (for now, until we can figure out a nicer way to deal with version differences).

(cherry picked from commit ccfc8d7)
@ycombinator ycombinator merged commit 2fdbdb3 into elastic:6.x Oct 16, 2018
@ycombinator ycombinator deleted the backport_8592_6.x branch October 16, 2018 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants